Homomorphic passcode encryption

ABSTRACT

A method of encrypting a passcode is disclosed. In one embodiment, the method includes: receiving an indication of a portion of the passcode; calculating a plaintext value based at least in part on the indication, wherein the plaintext value represents an encoded portion of the passcode; encrypting the plaintext value into ciphertext using a homomorphic encryption system; and updating a cumulative encryption string by executing a cumulative operation to aggregate the ciphertext corresponding to the encoded portion into the cumulative encryption string computed for a previous portion of the passcode, wherein the cumulative operation is dictated by a homomorphic property of the homomorphic encryption system.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional PatentApplication No. 61/938,495, filed Feb. 11, 2014, which is incorporatedby reference herein in its entirety.

BACKGROUND

A financial transaction system, as used herein, is a system that allowsa merchant to use, for example, a mobile device, to accept payment forselling a product, a service, or a rental to a purchaser.

In one example, the financial transaction system includes a mobiledevice (e.g., a tablet computer, a smartphone, etc.) and a card reader.The card reader is in the form of an accessory and couples to the mobileelectronic device (e.g., the card reader couples to the mobile devicethrough the audio jack of the mobile device). In this example, apurchaser uses a financial transaction card (e.g., a credit card, adebit card, a pre-paid gift card, etc.) to purchase the seller's productor service by allowing his/her credit card to be swiped through the cardreader. The card reader communicates the card's data to the mobiledevice, allowing the mobile device to confirm the authenticity of thecard and further to initiate authorization of the purchase transaction.In another example, the financial transaction system may include amobile device that accepts card-less payments from purchasers. In thisexample, a purchaser may convey his/her credit card information to theseller through a direct or indirect form of wireless communication withthe seller's mobile device. A person of any skill in this space wouldeasily be aware of countless other mechanisms that allow similarfinancial transactions to proceed in the context of such “mobile”payments.

While such mobile payment opportunities offer convenience and ease ofuse to both the seller and the purchaser, there are scenarios that maypresent new security concerns. For example, as part of the transactionflow, the purchaser may sometimes be required to enter a PIN code as anadditional layer of security. Such PIN codes are required, for example,in debit card-based purchases and even in some credit card-based (e.g.,Europay, MasterCard, Visa (EMV) card-based) purchases. In suchscenarios, the financial transaction system needs to protect the PINfrom being discovered by, for example, malware or other phishing events.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a control flow diagram illustrating a technique for encryptinga passcode utilizing homomorphic cryptography.

FIG. 2 is a block diagram illustrating an example of a passcodeverification system including a passcode entry device and anauthentication device.

FIG. 3 is a diagram illustrating an example of a timeline for encryptinga sequence of symbols representing a passcode.

FIG. 4 is a flow chart of a process to encrypt a passcode usinghomomorphic cryptography.

FIG. 5 is a flow chart of a process to authenticate a passcode entrybased at least in part on an encrypted message.

FIG. 6 is a block diagram of an example of a financial transactionsystem including an electronic device and a card reader.

The figures depict various embodiments of the present invention forpurposes of illustration only. One skilled in the art will readilyrecognize from the following discussion that alternative embodiments ofthe structures and the methods illustrated herein may be employedwithout departing from the principles of the disclosure describedherein.

DETAILED DESCRIPTION

The financial transaction system described herein involves a card readerand a general-purpose electronic device, such as a mobile device or astationary/semi-stationary system. For example, the mobile device may bea mobile phone or a tablet computer and the stationary/semi-stationarysystem may be a point-of-sale system or a desktop computer. The term“card reader” here refers to any object that can be used to obtaininformation from an object used to make an electronic payment where theobject must be in the general vicinity of the object, such as an opticalscanner, a near field communications device, a Bluetooth communicationsdevice, etc. The card reader may be an external device (e.g., in theform of a mobile phone accessory) that can be coupled to thegeneral-purpose electronic device. When the card reader detects afinancial transaction card (based on, for example, the card being swipedthrough the card reader, the card being brought in proximity to enableradio frequency (RF), Near Field Communication (NFC), or Bluetooth LowEnergy (BLE) communication between the card and the card reader, etc.),the card reader retrieves card information stored on the financialtransaction card to initiate a financial transaction through thegeneral-purpose electronic device. The term financial transaction cardrefers to any object that can be used to make an electronic payment,such as a mobile device via a digital wallet application, an objectcontaining an optical code such as a quick response (QR) code, etc. Thefinancial transaction card can store financial account related data tobe used in a financial transaction, such as to make a purchase. Forexample, the financial transaction card may be a credit card, a debitcard, or an integrated circuit card in accordance with the EMV standard.

In some instances, a user (i.e., a purchaser) initiating the financialtransaction may need to enter a passcode, such as a personalidentification number (PIN) or a password, on a passcode entry interfaceto authenticate and/or authorize the financial transaction. The passcodeentry interface may solicit the user to identify a sequence ofsymbols/digits representing the passcode. As the user enters thepasscode, the electronic device can encrypt the passcode to protectagainst discovery of the passcode by a malicious third party.

One security consideration in designing a passcode entry system iswhether a memory snapshot of the passcode entry device can compromisethe passcode entered by the user. The disclosed technique involves amethod of encrypting portions (e.g., characters, digits or alphabets) ofthe passcode entered by the user separately, and accumulating theencrypted portions into a cumulative encryption string (e.g., a singleencrypted digital string). Hence, the disclosed technique protects thedata flow through the memory of the passcode entry device such that anygiven memory snapshot can reveal at most a single portion (e.g., acharacter, a digit, or an alphabet) of the passcode.

The cumulative encryption string can be represented as a tuple,including a cumulative nonce product and a cumulative message string.The cumulative encryption string can be decrypted with a single set ofdecryption keys. That is, the decryption process needs only be run onceto derive the unencrypted plaintext, even though the cumulativeencryption string embodies multiple encrypted portions. The electronicdevice can capture a sequence of user inputs indicative of a sequence ofsymbols representing the passcode via an input component, such asbuttons or a touchscreen. The card reader or an external server coupledto the electronic device can then authenticate and/or authorize thefinancial transaction by verifying the passcode entered by the user.Conventionally, as a user (e.g., purchaser) enters the passcode, anunencrypted digital representation of the entire passcode may sometimeshave to be stored on a memory device(s) of the electronic device. Thedisclosed technique, instead, encrypts each portion of the passcodeseparately to prevent discovery of the entire passcode by maliciousentities. The electronic device can encrypt each portion of the passcodeas the portion is entered or determined, such that no memory device ofthe electronic device ever stores the entire unencrypted passcode.

A challenge associated with encrypting multiple portions of a passcodeis that delivery of multiple encrypted files puts a burden on thenetwork used for delivery. Further, decryption of the multiple encryptedfiles is memory and processor intensive and thus may necessitate morememory and computing resources at the receiving device. The disclosedtechnique overcomes these challenges by encrypting each portion (e.g., asymbol or digit) of the passcode using a homomorphic cryptosystem andaggregating the encrypted portions into a master encryption file (i.e.,the cumulative encryption string). The cumulative encryption stringincludes only a single layer of encryption despite including multipleseparately encrypted portions. The electronic device can utilize thehomomorphic property of the homomorphic cryptosystem to combine multipleencrypted portions into a final cumulative encryption string, thusreducing the burden on the network and the receiver-side memory andprocessor. The disclosed technique enables a single encrypted file to besent from the electronic device to the card reader without having tosend multiple encryption files for each symbol/digit of the passcode.Further, the electronic device can encrypt each individual symbol/digitas the user enters the symbol/digit, thus preventing discovery of thepasscode by a malicious third party.

Homomorphic encryption is a form of encryption that allows specifictype(s) of computational operation(s) to be carried out on ciphertexts(i.e., results of encryption) and obtain an encrypted result which, whendecrypted, matches the result of the same computational operation(s)performed on the plaintext (i.e., inputs to the encryption). Thespecific type of computational operation may be referred to as thehomomorphic property of the homomorphic cryptosystem. A homomorphicencryption scheme may preserve the homomorphic property for onlymultiplication, only addition, or for both addition and multiplication.For example, the unpadded RSA and the ElGamal are cryptosystems thatpreserve the homomorphic property for multiplication. A cryptosystemrefers to a suite of mechanisms/processes for implementing a particularform of encryption and decryption, including, for example, a keygeneration mechanism, an encryption mechanism, and a decryptionmechanism.

In at least one embodiment, the electronic device may implement ahomomorphic encryption process, such as according to the ElGamalcryptosystem, that preserves the homomorphic property formultiplication. Under the ElGamal cryptosystem, in a group G, if thepublic key is (G, q, g, h), where h=g^(x), x is the private key, and ris a random variable selected from the set {0, . . . , q−1}, then theencryption of a message m is ε(m)=(g^(r), m·h^(r)). The homomorphicproperty can be illustrated as ε(m₁)·ε(m₂)=(g^(r1), m₁·h^(r1)) (g^(r2),m₂·h^(r2))=(g^(r1+r2), m₁·m₂·h^(r1+r2))=ε(m₁·m₂).

The electronic device can encode each portion (e.g., a symbol or digit)of the passcode as a plaintext value, before encrypting the plaintextvalue into ciphertext. For example, the electronic device can encrypt aplaintext value calculated based in part on a numeric representation ofeach symbol/digit with the ElGamal cryptosystem. As a specific example,the plaintext value can be a prime number raised to the power of thedigit or to the power of a numeric representation of the symbol. Eachciphertext outputted by the cryptosystem is multiplied together with acumulative encryption string that is the product of all previousciphertexts produced from the previous symbols or digits. This productis then updated as the new cumulative encryption string. In this manner,instead of producing a sequence of ciphertexts (e.g., ε(m₁), ε(m₂), . .. ) from a sequence of symbols or digits, the electronic device only hasto upkeep a cumulative master encryption string (e.g.,ε(m₁)·ε(m₂)·ε(m₃)· . . . ). Because of the homomorphic property of theElGamal cryptosystem, this cumulative encryption string is identical tothe ciphertext resulting from encrypting the product of the plaintextvalues associated with each symbol or digit, e.g., εe(m₁·m₂·m₃· . . . ).

The disclosed technique can encode the portions of the passcode aspowers on small primes. In particular, if the passcode (e.g.,represented as a sequence of digits) is denoted by a vector d=[d₁, d₂, .. . , d_(M)], then the encoded portions may be denoted as EPs=[p₁ ^(d)^(—) ¹, p₂ ^(d) ^(—) ², . . . , p_(M) ^(d) ^(—) ^(M)], where the p_(i)denotes a set of prime bases and M denotes the number of portions in thepasscode. The set of prime bases can be chosen in accordance withvarious security restrictions. For example, the set of prime bases mayinclude small primes for ease of calculation.

The set of prime bases may be chosen for semantic security. For example,under embodiments utilizing the ElGamal cryptosystem or other similarcryptosystems, the prime bases can be chosen to have order q instead of2q. Here, “q” denotes the public encryption parameter for the ElGamalcryptosystem. Under the ElGamal cryptosystem, the modulus N used for theencryption mechanism is equal to 2q+1. An order (n) of a prime basis (p)is the number of elements in a cyclic group of modulo N for exponents ofthe prime basis. That is, the order is the smallest number n such thatp^(n)=e, where “e” denotes the identity element in the cyclic group. Forexample, using “2” as one of the prime bases for encoding may lead to aleak of information about the associated passcode portion. A maliciousthird party can observe that the order of the resulting encoding dependson the parity of the exponent. Exploiting the Legendre symbol of themessage, the malicious third party can reverse-engineer the parity ofthe passcode portion. If the passcode portion is a digit, the maliciousthird party can determine the parity of the digit through this exploit.To combat this issue, the set of prime bases can be chosen to have orderq. That is, every prime number in the set satisfies p_(i) ^(q)=1 (modN). This holds, for example, for the small prime “3” and many otherprime numbers.

The set of prime bases can be chosen by an external server system alongwith other static cryptography parameters of the homomorphiccryptosystem that are accessible by both the encryption-side device(e.g., the electronic device) and the decryption-side device (e.g., thecard reader). The set of prime bases can be stored in a static filemaintained by the external server system. Alternatively, multiple setsof potential prime bases may be associated with particular decryptionside devices, such as by hardware identifications of such devices. Ineither case, the electronic device can receive the set of prime basesand/or the public key for encryption by requesting such parameters fromthe external server system. Alternatively, the set of prime bases and/orthe public key may be part of a mobile application downloaded andinstalled onto the electronic device.

It is noted that whilst portions of the passcode that are encoded andencrypted have been illustrated as individual symbols or digits of thepasscode, the portions may be partitioned in other ways as well. Forexample, the portions can be pairs of symbols or digits. The portionscan further be values indicative of the symbols/digits that representthe passcode. For example, where the passcode is determined based ontouch events on the passcode entry interface, the electronic device canencode and encrypt the (X,Y) coordinates of each touch separately. Insome embodiments, the electronic device can encrypt the portionsdirectly without first encoding the portions or values indicative of theportions.

After the cumulative encryption string captures every portion of thepasscode entered by the user, the electronic device sends the cumulativeencryption string in a message to verify the passcode. The electronicdevice can send a message including the cumulative encryption string toan external server or the card reader to verify the passcode. The cardreader or the external server can access a decryption key consistentwith the encryption key used in the homomorphic cryptosystem implementedon the electronic device. The card reader or the external server candecrypt the cumulative encryption string to determine the product of theencoded portions of the passcode entered by the user.

The card reader or the external server can verify the user passcodeentry against an authentic passcode in the financial transaction card invarious manners. For example, the card reader can access the financialtransaction card via a read head to determine the authentic passcodeassociated with the purchaser's financial account. The card reader orthe external server can factor the encoded portions of the passcode(e.g., using the set of prime numbers that is used to encode) todetermine the passcode entry and use the passcode entry to verifyagainst the authentic passcode. As another example, the card reader cansend the decrypted and decoded user passcode entry to the financialtransaction card for verification against the authentic passcode.

In other embodiments, the card reader or the external server cancalculate a comparison value based at least in part on the authenticpasscode to verify the passcode. For example, the comparison value canbe a product of prime numbers, each raised to the power of respectivedigits in the authentic passcode. The prime numbers used here are thesame prime numbers used to calculate the plaintext values (i.e., theencoded portions) during the encryption process. In this way, the cardreader or the external server can compare the comparison value againstthe decrypted cumulative encryption string. When both values match orwhen both values maintain an equivalent mathematical property, the cardreader or the external server can authorize and authenticate thefinancial transaction.

FIG. 1 is a control flow diagram illustrating a technique for encryptinga passcode utilizing homomorphic cryptography. A user can enter apasscode on an electronic device 102, such as the PIN digits “8144” asshown. The electronic device 102 may be a general-purpose electronicdevice, such as a mobile device or a stationary device. The electronicdevice 102 may include and execute a general-purpose operating systemcapable of running one or more third-party applications that may bedownloaded, installed, and executed on the electronic device 102.

For example, the electronic device 102 provides a passcode entryinterface 104 to enable the user to identify a sequence of symbolsrepresenting the passcode. The sequence of symbols may include numericdigits, alphabetical characters, alphanumeric characters, pictograms,icons, other types of enumeration, or any combination thereof. Eachsymbol can have a numeric representation, such as a binaryrepresentation, that can be used for encryption.

The passcode entry interface 104 may be implemented as a user interfacedisplayed on a touchscreen. The electronic device 102 generates anddisplays the passcode entry interface 104 when the electronic device 102needs to authenticate a financial transaction or other types of useroperations. Alternatively, the passcode entry interface 104 may insteadbe implemented with a set of physical buttons.

As the user enters the passcode, the electronic device 102 canseparately encrypt portions of the passcode utilizing a homomorphiccryptography system 106. The homomorphic cryptography system 106 is aprocessing module of the electronic device 102 capable of encryptingdatasets into ciphertexts according to a homomorphic cryptosystem, suchas the ElGamal cryptosystem. The ciphertexts generated by thehomomorphic cryptography system 106 maintain a homomorphic property. Thehomomorphic cryptography system 106 may be implemented as an applicationspecific integrated circuit or as instructions executable by aprocessor.

The portions to encrypt can correspond to the individual symbols thatmake up the passcode. The portions can also correspond to subsets of thesymbols. Alternatively, the portions to encrypt can be datasets that areused, at least partially, to determine the individual symbols. Forexample, the portions can be locations on the passcode entry interfacewhere a touch event has been detected. The electronic device 102 canencrypt each portion whenever each portion is determined. For example,the encryption of a portion can occur in response to identifying asymbol entered by the user or to detecting a touch event on the passcodeentry interface 104.

In some embodiments, the electronic device 102 can first encode eachportion into a plaintext value and then encrypt the plaintext valuecorresponding to such portion. For example, the electronic device 102calculates the plaintext value based at least partly on raising thepower of a prime number to a numeric value of the portion (i.e.,multiplying the prime number for a number of times equal to the numericvalue of the portion). In the example shown in FIG. 1, the ciphertextsof the encoded plaintext values are [p₁ ⁸], [p₂ ¹], [p₃ ⁴], and [p₄ ⁴],wherein the bracket denotes the encryption and “p_(i)” denotes the primenumber used for each sequential position of the encoded portions (e.g.,“p₁” being the prime number used for the first portion and “p₂” beingthe prime number used for the second portion, etc.).

For each portion, the electronic device 102 encrypts the encodedplaintext and aggregates the resulting ciphertext into a cumulativeencryption string 108. The cumulative encryption string 108 is aciphertext file, which aggregates all previously generated ciphertextscorresponding to previously encrypted portions of the passcode. How theelectronic device 102 aggregates the ciphertexts depends on thehomomorphic property of the homomorphic cryptography system 106. Forexample, if the homomorphic property preserves multiplication, theciphertexts are aggregated as a product; and if the homomorphic propertypreserves addition, the ciphertexts are aggregated as a summation. Aseach new ciphertext is generated, the homomorphic cryptography system106 updates the cumulative encryption string 108 by multiplying oradding the previous instance of the cumulative encryption string 108with the new ciphertext.

The passcode entry interface 104 and the homomorphic cryptography system106 may both be part of a mobile application (commonly referred to as an“app”) that is downloaded and installed onto the electronic device 102.The mobile application is stored in a memory device (not shown), such asa volatile or a non-volatile storage medium, and can be executed by aprocessor (not shown) of the electronic device 102.

After the user enters the entire passcode, the homomorphic cryptographysystem 106 would have aggregated ciphertexts corresponding to everyportion or encoded portion of the passcode into the final cumulativeencryption string 108. The electronic device 102 can then send the finalcumulative encryption string 108 to a passcode verification system 110in a message 112. The passcode verification system 110 is a devicecapable of verifying the authenticity of the passcode entered by theuser (henceforth referred to as the “passcode entry”). The passcodeverification system 110 has access to an authentic version of thepasscode (henceforth referred to as the “authentic passcode”). Thepasscode verification system 110 can use the authentic passcode toverify the passcode entry.

In some embodiments, the passcode entry and the passcode encryptionprocesses are initiated by the passcode verification system 110. Forexample, the passcode verification system 110 may be a card readercoupled to the electronic device 102. The card reader can initiate afinancial transaction upon detecting a swipe of a payment card, such asa credit card, a debit card, an EMV card (a payment card in accordancewith the Europay, MasterCard, Visa standard), etc. The card reader cansend the card information of the payment card to the electronic device102. The electronic device 102 can then try to authenticate thefinancial transaction by requesting the user to enter the passcodethrough the passcode entry interface 104.

The passcode verification system 110 extracts the cumulative encryptionstring 108 from the message 112 and decrypts the cumulative encryptionstring 108 to determine an accumulated value indicative of a sequence ofsymbols that represents the passcode entered by the user.

The accumulated value can uniquely identify the passcode entry. In someembodiments, the accumulated value can be factored using the set ofprime numbers used to calculate the encoded portions of the passcode todetermine the sequence of symbols. The sequence of symbols can then beused to verify against an authentic passcode associated with thefinancial transaction card. In other embodiments, to verify the passcodeentry, the passcode verification system 110 can calculate a comparisonvalue based on the authentic passcode associated with the financialtransaction card in the same manner that the accumulated value iscalculated. That is, the passcode verification system 110 can encodeportions of the authentic passcode in the same encoding process as theportions of the passcode entry, and can accumulate the encoded portionsof the authentic passcode using the same cumulative operation based onthe homomorphic property of the homomorphic cryptography system 106.

For example, the passcode verification system 110 can calculate thecomparison value by taking the powers of the same prime numbers used bythe homomorphic cryptosystem 106 to the numeric digits of the authenticpasscode. The passcode verification system 110 can then verify thepasscode entry by comparing whether the accumulated value and thecomparison value match each other. In other embodiments, the passcodeverification system 110 can determine the passcode entry from theaccumulated value (e.g., by decrypting and decoding the accumulatedvalue as described in disclosure), and verify the determined passcodeentry against the known authentic passcode in the financial transactioncard.

FIG. 2 is a block diagram illustrating an example of a passcodeverification system 200 including a passcode entry device 202 and anauthentication device 204. The passcode verification system 200 may beconsistent with various other embodiments described in this disclosure.The passcode entry device 202 is illustrated as a mobile device with atouchscreen, but may be implemented as another type of electronic devicewith computing capabilities. For example, the passcode entry device 202may be the electronic device 102 of FIG. 1. The authentication device204 is illustrated as a card reader, but may be implemented also asanother type of electronic device with computing capabilities. Forexample, the authentication device 204 may be the passcode verificationsystem 110 of FIG. 1.

The authentication device 204 includes logic circuitry 206. The logiccircuitry 206 controls and executes processes operated by theauthentication device 204. The logic circuitry 206 may comprise one ormore of an application-specific integrated circuit (ASIC), fieldprogrammable gate array (FPGA), a controller, a microprocessor, andother types of digital and/or analog circuitry.

The logic circuitry 206 can communicate with a read head 208. The readhead 208 can detect a financial transaction card, such as detecting thecard being swiped or the card entering the proximity of the read head208 (e.g., via RF or BLE). The read head 208 may be a magnetic stripreader, an NFC smart card, a radiofrequency identification (RFID)reader, a Bluetooth reader, a radio frequency receiver, an opticalreader, or any combination thereof.

In various embodiments, the logic circuitry 206 may include a signalconverter 214, a signal processor 216, and a security module 218 tofacilitate communication with the read head 208. The signal converter214 is circuitry that converts analog readings from the read head 208into digital data. The signal processor 216 is circuitry for processingand interpreting the digital data from the signal converter 214 intocard information, representative of financial account information of auser. Optionally, the logic circuitry 206 may include the securitymodule 218 to encrypt and/or decrypt information to and from thefinancial transaction card or otherwise provide secure access to afinancial transaction card via the read head 208.

The logic circuitry 206 can communicate with the passcode entry device202 via a first connection interface 220. The first connection interface220 is adapted to communicate with the passcode entry device 202, suchas via a wired connection (e.g., an audio cable or a bus) or wirelessly(e.g., RF or Bluetooth communication). The logic circuitry 206 caninitiate a financial transaction with the passcode entry device 202through the first connection interface 220 when the read head 208detects the financial transaction card. The logic circuitry 206 can senda message to the passcode entry device 202 through the first connectioninterface 220 to initiate a process to authenticate and authorize thefinancial transaction. In some embodiments, the message can cause theelectronic device to generate and display a passcode interface.

The passcode entry device 202 includes a second connection interface 222that couples to the first connection interface 220 of the authenticationdevice 204 directly or indirectly, including via a wired connection or awireless connection. The passcode entry device 202 includes atransaction manager module 224 to facilitate authorization of thefinancial transaction. The transaction manager module 224 can manageidentity of goods, services, and/or rentals associated with thefinancial transaction. The transaction manager module 224 can processmessages received via the second connection interface 222, including themessage to initiate the process to authenticate the financialtransaction. The transaction manager module 224 can notify a passcodeinterface module 226 to solicit a user to enter a passcode in responseto the message. For example, the passcode interface module 226 cangenerate and display a passcode entry interface on a touchscreen 228.The passcode entry interface may include buttons labeled with symbols(e.g., digits, characters, icons, etc.) that the user may interact withto indicate a sequence of symbols representing the passcode. Thepasscode interface module 226 monitors the touchscreen 228 and recordslocations of any “touch” events to determine the sequence of symbols.

The passcode entry device 202 includes an encryption module 230 toimplement a piecemeal encryption of portions of the passcode using ahomomorphic cryptosystem. The encryption module 230 can encrypt theportions sequentially as the user enters each portion. For example, eachportion can correspond to a touch event or a set of touch events fromthe user. Each portion can also correspond to a symbol in the passcodeentry.

In some embodiments, the encryption module 230 can encode each portionof the passcode as a plaintext value. That is, as each portion isidentified, the encryption module 230 can calculate the plaintext valuebased at least partly on the identified portion and encrypt theplaintext value into ciphertext utilizing a homomorphic cryptosystem,such as with the ElGamal asymmetric encryption. In one example, theplaintext values may just be numeric representations (d_(i)) of thesymbols of the passcode. Alternatively, a hash function or an encodingprocess can be used to determine the plaintext value from the numericrepresentation of each portion. For example, the encryption module 230can calculate the plaintext value for each symbol by selecting a primenumber from a set of prime bases (p_(i)) and calculating the plaintextvalue by raising the small prime to the power represented by the numericrepresentation of the symbol. In this example, the plaintext is equal top_(i) ^(d) ^(—) ^(i). The encryption module 230 can select the smallprime based at least in part on a sequential counter of the symbolentered, such as selecting p₁ for the first portion entered by the userand selecting p₂ for the second portion entered by the user.

The encryption module 230 then “accumulates” the ciphertexts generatedfor the portions into a cumulative encryption string 232 by means of acumulative operation, e.g., the cumulative encryption string 232including a summation or product of the ciphertexts. For example, thecumulative operation can be a running product, where each ciphertext ismultiplied together to form the cumulative encryption string 232. Insome embodiments, the ciphertexts are multiplied together when allportions of the passcode is entered by the user. In other embodiments,the encryption module 230 iteratively updates the cumulative encryptionstring 232 to include each newly calculated ciphertext in its cumulativeproduct. The cumulative encryption string 232 can be stored in acryptography storage 234. In embodiments, the ciphertexts of eachportion is deleted from the memory of the passcode entry device 202after the ciphertext is “accumulated” into the cumulative encryptionstring 232.

Cryptography provisions 236 may be required to implement the homomorphiccryptosystem, particularly for the encryption module 230. Thecryptography provisions 236 may include, for example, an encryption key(e.g., a public key), a set of prime bases, a modulus, a generator,other static parameters or random variables, or any combination thereof.Some or all of the provisions/parameters may be associated with ahardware identification data of the authentication device 204 (i.e.,where decryption occurs). The encryption module 230 can receive thehardware identification data (henceforth referred to as “hardware ID”)from the authentication device 204, such as when the authenticationdevice 204 first connects with the passcode entry device 202.Subsequently, the hardware ID may be used to query an external serversystem, via a network interface 238, for some or all of the cryptographyprovisions 236. Alternatively, the encryption module 230 can receivesome of the cryptography provisions 236, such as the public key forencryption, directly from the authentication device 204. Thecryptography provisions 236 may be stored in the cryptography cache 232as well or another memory device of the passcode entry device 202. Insome embodiments, an association between each set of the cryptographyprovisions 236 (e.g., the public key) and the hardware ID of acorresponding device for decryption can be stored in the cryptographystorage 234. Accessing that association enables the encryption module230 to select the correct set of provisions corresponding to theintended destination of the cumulative encryption string 232, such asusing the public key that matches the private key used for decryption atthe intended destination.

Other examples of the cryptography provisions 236 may be necessary toimplement the homomorphic encryption, such as the ElGamal cryptosystem,including a modulus (henceforth referred to as “N”), a generator(henceforth referred to as “g”), and the set of prime bases p_(i). Theseparameters may be provisioned as part of a mobile application that isdownloaded and installed on the passcode entry device 202.Alternatively, these parameters may be requested from an external serversystem or be part of a factory setting of the passcode entry device 202.

In some embodiments, to verify the authenticity of the passcode entry,the transaction manager module 224 transmits a message containing thecumulative encryption string 232 indicative of the passcode entrythrough the second connection interface 222 to the authentication device204. In alternative embodiments, the transaction manager module 224transmits the message through the network interface 238 to an externalserver system to verify the passcode entry. The logic circuitry 206receives the message through the first connection interface 220 andextracts the cumulative encryption string 232 from the message. Thelogic circuitry 206 can implement a decryption module 240. Thedecryption module 240 is configured to decrypt data encrypted by thehomomorphic cryptosystem implemented in the encryption module 230. Forexample, the decryption module 240 can access cryptography provisionstorage 242. The cryptography provision storage 242 can include aprivate key associated with the public key used by the encryption module230. The cryptography provision storage 242 can include other parametersneeded for decryption, such as the modulus N, the generator g, and theset of prime bases p_(i).

The decryption module 240 determines an accumulated value indicative ofthe passcode entry by decrypting the cumulative encryption string 232.For example, the accumulated value can be a product of multiplyingtogether encoded portions of the passcode entered by the user. The logiccircuitry 206 can then use the accumulated value to verify against anauthentic passcode. For example, the logic circuitry 206 can access theauthentic passcode when the read head 208 detects the financialtransaction card. A sequence of symbols representative of the passcodeentry can be factored from the accumulated value using the set of primenumbers used to encode the symbols of the passcode. The logic circuitry206 can then verify the determined passcode entry against the authenticpasscode in either the financial transaction card (e.g., by sending thedetermined passcode entry to the financial transaction card) or theauthentication device 104.

Alternatively, the logic circuitry 206 can calculate a comparison valuebased at least in part on the authentic passcode to compare against theaccumulated value of the encoded portions representing the passcodeentry. Based on the comparison, the logic circuitry 206 can eitherauthorize or deny the financial transaction.

Regarding FIG. 1 and FIG. 2, blocks, components, and/or modulesassociated with the electronic device 102, the passcode verificationsystem 110, the passcode entry device 202 and the authentication device204, each may be implemented in the form of special-purpose circuitry,or in the form of one or more appropriately programmed programmableprocessors, or a combination thereof. For example, the modules describedcan be implemented as instructions on a tangible storage memory capableof being executed by a processor or a controller on a machine. Thetangible storage memory may be a volatile or a non-volatile memory. Insome embodiments, the volatile memory may be considered “non-transitory”in the sense that it is not a transitory signal. Modules may be operablewhen executed by a processor or other computing device, e.g., a singleboard chip, application specific integrated circuit, a fieldprogrammable field array, a network capable computing device, a virtualmachine terminal device, a cloud-based computing terminal device, or anycombination thereof. Caches, memory space, and storages described in thefigures can be implemented with the tangible storage memory as well,including volatile or non-volatile memory.

Each of the modules may operate individually and independently of othermodules. Some or all of the modules may be executed on the same hostdevice or on separate devices. The separate devices can be coupled via acommunication module to coordinate its operations via an interconnect orwirelessly. Some or all of the modules may be combined as one module.

A single module may also be divided into sub-modules, each sub-moduleperforming separate method step or method steps of the single module. Insome embodiments, the modules can share access to a memory space. Onemodule may access data accessed by or transformed by another module. Themodules may be considered “coupled” to one another if they share aphysical connection or a virtual connection, directly or indirectly,allowing data accessed or modified from one module to be accessed inanother module. In some embodiments, some or all of the modules can beupgraded or modified remotely. The electronic device 102, the passcodeverification system 110, the passcode entry device 202, or theauthentication device 204 may include additional, fewer, or differentmodules for various applications.

FIG. 3 is a diagram illustrating an example of a timeline 300 forencrypting a sequence of symbols representing a passcode. The disclosedtechnique involves piecemeal encryption of portions of the passcode.This technique minimizes the available time window during which anunencrypted passcode symbol, such as a PIN digit, is present (i.e.,available on memory) on a passcode entry device, such as the electronicdevice 102 of FIG. 1 or the passcode entry device 202 of FIG. 2. Thepiecemeal encryption technique decouples the digits from each other.

Time tags 302A-F (collectively, “time tags 302”) indicate events relatedto a user's entry of the sequence of symbols. For example, time tag 302A(“t₀”) indicates when a passcode entry interface is provided on thepasscode entry device. Time tags 302B to 302E (“t₁” to “t₄”) indicatewhen the passcode entry device identifies/determines each symbol/digitof the passcode entry. For example, t_(i) may correspond to when thefirst digit entered by the user is identified and t₂ may correspond towhen the second digit is identified. Where the passcode entry deviceuses a touchscreen to display an interactive passcode entry interface,each of the time tags 302B-E may correspond with when a touch event isdetected or when the passcode entry device determines which symbolcorresponds to that touch event. Under the disclosed technique ofpasscode encryption, the passcode entry device can immediately orsubstantially immediately encrypt each of these symbols/digits after thesymbol/digit is identified on the device.

One security consideration in designing a passcode entry system iswhether a memory snapshot of the passcode entry device can compromisethe passcode entered by the user. As shown, if memory were capturedshortly after t_(i), then the memory snapshot would reveal noinformation about the first digit through the (i−1)^(th) digit of thepasscode. The memory snapshot would also reveal no information aboutsubsequent digits, such as (i+1)^(th) digit through the last digit, ofthe passcode. In the example of using the ElGamal cryptosystem, once theper-digit secret/multiplier is deleted, the encryption is not reversibleby any party who does not possess the private key. In the end, thepasscode entry device can safely transmit the cumulative encryption to apasscode verification system at time tag 302F.

FIG. 4 is flow chart of a process 400 to encrypt a passcode usinghomomorphic cryptography. The process 400 may be consistent with variousother embodiments described in this disclosure. The process 400 performsa piecemeal encryption of the passcode in a cumulative manner. Step 402includes an electronic device, such as the electronic device 102 of FIG.1 or the passcode entry device 202 of FIG. 2, initializing a financialtransaction (e.g., a payment transaction). Step 402 may includereceiving card data from a card reader in response to the card readerdetecting a financial transaction card. For example, the card reader maybe the passcode verification device 110 of FIG. 1 or the authenticationdevice 204 of FIG. 2.

The electronic device then displays a passcode entry interface tosolicit a user to enter the passcode in step 404, where the passcode isused to authenticate the financial transaction. For example, theelectronic device can display the passcode entry interface on atouchscreen. The passcode entry interface may include interactiveelements labeled with symbols (e.g., characters, digits, icons, etc.)for composing the passcode.

Through the passcode entry interface, the electronic device receives anindication from the user identifying at least a portion of the passcodein step 406. For example, the indication can be a key entrycorresponding to a symbol that is part of the passcode. Specifically,the indication can be a touch event on the touchscreen, where a locationof the touch event corresponds to a label of the symbol on the passcodeentry interface.

The electronic device can encode the identified portion as a plaintextvalue in step 408, prior to step 410 of encrypting the encoded portion.The identified portion, such as a symbol, can have a numericrepresentation (d_(i)), such as a number represented by binary bits.Here, “i” denotes the position of the symbol in the passcode. Theencoding in step 408 may include selecting a prime number (p_(i)) from aset of small prime bases and calculating the prime number raised to thepower equal to the numeric representation of the identified portion,i.e., p_(i) ^(d) ^(—) ^(i). The prime number used to encode theidentified portion can be selected based at least in part on theposition of the portion in the passcode relative to other portions.

This set of small prime bases may be part of the cryptography parametersstored in the electronic device. The cryptography parameters may includean encryption key (e.g., a public encryption key), a generator g, amodulus N, the set of prime bases, or any combination thereof. Theprocess 400 may include step 412 of receiving such cryptographyparameters from an external source. The electronic device may receive atleast a portion of the cryptography parameters directly or indirectlyfrom the card reader. The electronic device may instead receive at leasta portion of the cryptography parameters directly or indirectly from anexternal server system. For example, the electronic device may firstretrieve a hardware ID of the card reader, and then query the externalserver system for cryptography parameters associated with the hardwareID. In some embodiments, the cryptography parameters may be retrievedfrom both the card reader and the external server system. This way, theelectronic device has an opportunity to verify the parameters againsteach other. The cryptography parameters may also be encrypted and/orotherwise encoded with a verifiable signature. Upon receiving thecryptography parameters, the electronic device can verify thesecryptography parameters using the verifiable signature, such as via acertificate authority. In alternative embodiments, at least a portion ofthe cryptography parameters is downloaded onto the electronic devicewhen a mobile application implementing the process 400 is downloaded andinstalled onto the electronic device.

The prime numbers used for encoding in step 408 may be based on one ormore of the cryptography parameters retrieved in step 412. For example,when encrypting using the ElGamal encryption mechanism, the primenumbers may satisfy the requirement that p_(i) ^(q)≡1 (mod N). Here, Nis the modulus chosen to perform the ElGamal encryption and q is aSophie Germain prime associated with N such that N=2q+1. N and/or q maybe part of the cryptography parameters accessible to the electronicdevice.

Step 410 includes the electronic device encrypting the encoded portionfrom step 408 or the identified portion from step 406 into ciphertextusing a homomorphic encryption system, such as the encryption mechanismof the ElGamal cryptosystem or a variant thereof. The encryption mayutilize the received cryptography parameters in step 412, including theencryption key.

Certain encryption mechanisms, including the El Gamal encryptionmechanism, generate and use a random variable as part of the encryptionto protect the confidentiality of the ciphertexts. It is noted that instep 410, the electronic device may generate the random variable byreading a pseudorandom stream using a non-buffering I/O call. Anon-buffering I/O call can minimize exposure of the random variable inthe memory buffer of the electronic device to avoid a third party frominfluencing or reading the random variable in order to extractinformation related to the passcode.

The electronic device updates a cumulative encryption string when theencryption finishes in step 414. If the encoded portion corresponds tothe first portion of the passcode, step 414 sets the cumulativeencryption string as the ciphertext for that portion. Otherwise, thecumulative encryption string is updated by executing a cumulativeoperation on the ciphertext based on the cumulative encryption stringcomputed for a previous portion of the passcode. The homomorphicproperty of the homomorphic encryption system dictates which cumulativeoperation to execute. For example, where ElGamal encryption mechanism isused, the cumulative operation is a cumulative product (i.e.,multiplying the ciphertexts together). That is, the cumulativeencryption string can be set as a cumulative product of the ciphertextand all previous ciphertexts corresponding to all previously encryptedportions of the passcode.

Step 406, step 408, step 410, and step 414 are repeated until thecumulative encryption string “accumulates” every portion of thepasscode. In step 416, the electronic device transmits a messagecontaining the cumulative encryption string to a destination device toverify the passcode. For example, the destination device can be the cardreader or an external server system.

FIG. 5 is a flow chart of a process 500 to authenticate a passcode entrybased at least partly on an encrypted message. The process 500 may beconsistent with various other embodiments described in this disclosure.The process 500 may be implemented by a passcode verification system,such as the passcode verification system 110 of FIG. 1 or theauthentication device 204 of FIG. 2. Step 502 includes receivingciphertext from a passcode entry device, such as the electronic device102 of FIG. 1 or the passcode entry device 202 of FIG. 2. The passcodeverification system can decrypt the ciphertext into plaintext in step504. The decryption uses a decryption mechanism of a homomorphiccryptosystem, such as the ElGamal cryptosystem.

The plaintext is indicative of a product or a sum of encoded portions ofthe passcode entry. Each encoded portion represents a portion of thepasscode entry and a position of the portion relative to other portionsof the passcode entry. For example, the encoded portion may beindicative of a symbol that is part of the passcode. Subsequently, instep 506, the passcode verification system verifies the passcode entrybased at least in part on the product or the sum of the encodedportions.

As a specific example, step 506 can include sub-step 508 to retrieve anauthentic passcode. Where the passcode verification system is a cardreader device, sub-step 508 includes retrieving the authentic passcodefrom a financial transaction card via a read head. In sub-step 510, thepasscode verification system can encode portions of the authenticpasscode in the same manner as how the encoded portions of the passcodeentry are calculated on the passcode entry device. In sub-step 512, thepasscode verification system can calculate a cumulative value through acumulative operation on the encoded portions of the authentic passcode.The cumulative operation is dictated by the homomorphic property of thehomomorphic cryptosystem. For example, where the homomorphic propertypreserves multiplication, the cumulative value is calculated as acumulative product of the encoded portions of the authentic passcode. Insub-step 514, the passcode verification system can authenticate thepasscode entry by comparing the cumulative value against the product orthe sum of the encoded portions of the passcode entry.

As another specific example, after retrieving the authentic passcode insub-step 508, the passcode verification system can determine a sequenceof symbols representative of the passcode entry by factoring the productof the encoded portions in sub-step 516. The product may be factoredusing a set of prime numbers used to encode each portion. The passcodeverification system can then compare the sequence against the authenticpasscode in sub-step 518. In other embodiments, the passcodeverification system sends the sequence to the financial transaction cardfor the financial transaction card to verify the sequence against theauthentic passcode.

While processes or blocks are presented in a given order in FIGS. 4 and5, alternative embodiments may perform routines having steps, or employsystems having blocks, in a different order, and some processes orblocks may be deleted, moved, added, subdivided, combined, and/ormodified to provide alternative or subcombinations. Each of theseprocesses or blocks may be implemented in a variety of different ways.In addition, while processes or blocks are at times shown as beingperformed in series, these processes or blocks may instead be performedin parallel, or may be performed at different times.

FIG. 6 is a block diagram of an example of a financial transactionsystem 600 including an electronic device 602 (e.g., the electronicdevice 102 of FIG. 1 or the passcode entry device 202 of FIG. 2) and acard reader 604 (e.g., the passcode verification system 110 of FIG. 1 orthe authentication device 204 of FIG. 2). Note that the architectureshown in FIG. 6 is only one example architecture of the financialtransaction system 600, and that the electronic device 602 can have moreor fewer components than shown, or a different configuration ofcomponents. The various components shown in FIG. 6 can be implemented byusing hardware, software, firmware or a combination thereof, includingone or more signal processing and/or application specific integratedcircuits.

The electronic device 602 that can include one or more computer-readablemediums 610, processing system 620, touch subsystem 630,display/graphics subsystem 640, communications circuitry 650, storage660, and audio circuitry 670. These components may be coupled by one ormore communication buses or other signal lines.

The communications circuitry 650 can include RF circuitry 652 and/orport 654 for sending and receiving information. The RF circuitry 652permits transmission of information over a wireless link or network toone or more other devices and includes well-known circuitry forperforming this function. The port 654 permits transmission ofinformation over a wired link. The communications circuitry 650 cancommunicate, for example, with the card reader 604. Alternatively, thecard reader 604 may be connected through the audio circuitry 670. Thecommunications circuitry 650 can be coupled to the processing system 620via a peripherals interface 624. The peripherals interface 624 caninclude various known components for establishing and maintainingcommunication between peripherals and the processing system 620.

The audio circuitry 670 can be coupled to an audio speaker (not shown),a microphone (not shown), the card reader 604, or any combinationthereof and includes known circuitry for processing signals receivedfrom the peripherals interface 624 to enable a user to communicate inreal-time with other users or system(s). In some embodiments, the audiocircuitry 670 includes a headphone jack (not shown).

The peripherals interface 624 can couple with various peripherals, suchas the card reader 604, of the system to one or more processors 626 andthe computer-readable medium 610. The one or more processors 626 cancommunicate with one or more computer-readable mediums 610 via acontroller 622. The computer-readable medium 610 can be any device ormedium that can store code and/or data for use by the one or moreprocessors 626. The medium 610 can include a memory hierarchy, includingbut not limited to cache, main memory, and secondary memory. The memoryhierarchy can be implemented using any combination of RAM (e.g., SRAM,DRAM, DDRAM), ROM, FLASH, magnetic and/or optical storage devices, suchas disk drives, magnetic tape, CDs (compact disks) and DVDs (digitalvideo discs). The medium 610 may also include a transmission medium forcarrying information-bearing signals indicative of computer instructionsor data (with or without a carrier wave upon which the signals aremodulated). For example, the transmission medium may include acommunications network, including but not limited to the Internet,intranet(s), Local Area Networks (LANs), Wide Local Area Networks(WLANs), Storage Area Networks (SANs), Metropolitan Area Networks (MAN)and the like.

The one or more processors 626 can run various software componentsstored in the medium 610 to perform various functions for the electronicdevice 602. Note that the order of the modules in the medium 610 doesnot denote the order of a software stack as implemented in the medium610. In some embodiments, the software components include an operatingsystem 611, a communication module (or set of instructions) 612, a touchprocessing module (or set of instructions) 613, a passcode interfacemodule (or set of instructions) 615, such as the passcode interfacemodule 226 of FIG. 2, and one or more applications (or set ofinstructions) 618, for example, including one or more of the modulesdescribed in the electronic device 102 and/or the passcode entry device202. Each of these modules and above noted applications correspond to aset of instructions for performing one or more functions described aboveand the methods described in this application (e.g., thecomputer-implemented methods and other information processing methodsdescribed herein). These modules (e.g., sets of instructions) need notbe implemented as separate software programs, procedures, or modules,and thus various subsets of these modules may be combined or otherwiserearranged in various embodiments. In some embodiments, the medium 610may store a subset of the modules and data structures identified above.Furthermore, the medium 610 may store additional modules and datastructures not described above.

The operating system 611 can include various procedures, sets ofinstructions, software components, and/or drivers for controlling andmanaging general system tasks (e.g., memory management, storage devicecontrol, power management, etc.) and facilitates communication betweenvarious hardware and software components.

The communication module 612 facilitates communication with otherdevices using the communications circuitry 650 and includes varioussoftware components for handling data received from the RF circuitry 652and/or the port 654.

The touch-processing module 613 includes various software components forperforming various tasks associated with touch hardware 634 includingbut not limited to receiving and processing touch input received fromthe I/O device 630 via a touch I/O device controller 632. For example,the touch-processing module 613 can also include software components forperforming tasks associated with other I/O devices (not shown).

The passcode interface module 615 is configured to present and maintaina passcode interface for a user to enter a passcode to authenticate theuser's identity. The passcode interface module 615 can include variousknown software components for rendering, animating and displayinggraphical objects on a display surface. In embodiments, in which thetouch hardware 634 is a touch sensitive display (e.g., touch screen),the passcode interface module 615 includes components for rendering,displaying, and animating objects on the touch sensitive display. Thepasscode interface module 615 can provide graphics instructions (e.g.,animation or still image) to graphics I/O controller 644, so that thegraphics I/O controller 644 can display the graphics on display 646. Thepasscode interface module 615 can further control the audio circuitry670 to provide an auditory component to the passcode interface.

One or more applications 618 can include any applications installed onthe electronic device 602, including without limitation, modules of theelectronic device 102 and/or the passcode entry device 202, a browser,keyboard emulation, widgets, JAVA-enabled applications, encryption,digital rights management, voice recognition, voice replication,location determination capability (such as that provided by the globalpositioning system (GPS)), etc.

The touch I/O controller 632 is coupled to the touch hardware 634 forcontrolling or performing various functions. The touch hardware 634communicates with the processing system 620 via the touch I/O devicecontroller 632, which includes various components for processing usertouch input (e.g., scanning hardware). One or more other inputcontrollers (not shown) receives/sends electrical signals from/to otherI/O devices (not shown). Other I/O devices may include physical buttons,dials, slider switches, sticks, keyboards, touch pads, additionaldisplay screens, or any combination thereof.

If embodied as a touch screen, the touch hardware 634 displays visualoutput to the user in a GUI. The visual output may include text,graphics, video, and any combination thereof. Some or all of the visualoutput may correspond to user-interface objects. The touch hardware 634forms a touch-sensitive surface that accepts touch input from the user.The touch hardware 634 and the touch controller 632 (along with anyassociated modules and/or sets of instructions in the medium 610)detects and tracks touches or near touches (and any movement or releaseof the touch) on the touch hardware 634 and converts the detected touchinput into interaction with graphical objects, such as one or moreuser-interface objects. In the case in which the touch hardware 634 andthe display 646 are embodied as a touch screen, the user can directlyinteract with graphical objects that are displayed on the touch screen.Alternatively, in the case in which hardware 634 is embodied as a touchdevice other than a touch screen (e.g., a touch pad), the user mayindirectly interact with graphical objects that are displayed on aseparate display screen. In some embodiments, the touch controller 632may be configured such that it is disabled when a passcode interface isbeing displayed by the display 646.

Embodiments in which the touch hardware 634 is a touch screen, the touchscreen may use LCD (liquid crystal display) technology, LPD (lightemitting polymer display) technology, OLED (organic light emittingdiode), or OEL (organic electro luminescence), although other displaytechnologies may be used in other embodiments.

In some embodiments, the peripherals interface 624, the one or moreprocessors 626, and the memory controller 622 may be implemented on asingle chip. In some other embodiments, they may be implemented onseparate chips. The storage 660 can be any suitable medium for storingdata, including, for example, volatile memory (e.g., cache, RAM),non-volatile memory (e.g., Flash, hard-disk drive), or a combination ofboth for storing data.

What is claimed is:
 1. A method comprising: initializing, at a mobiledevice, a financial transaction and receiving card data from a cardreader attached to the mobile device, wherein the initializing is inresponse to detecting a swipe of a financial transaction card at thecard reader; displaying a passcode entry interface on a touchscreen ofthe mobile device to enable a user to enter a passcode; determining asequence of digits corresponding to the passcode entered by the user;for each digit of the sequence, encoding the digit into an encodeddigit, and encrypting the encoded digit into ciphertext usinghomomorphic cryptography; and maintaining a cumulative product based atleast partly on the ciphertexts corresponding to the digits of thesequence; and initiating a process to authenticate the financialtransaction by transmitting a message indicative of at least thecumulative product, wherein the cumulative product represents thepasscode entered by the user.
 2. The method of claim 1, whereinmaintaining the cumulative product includes multiplying the ciphertextcorresponding to a newly entered digit with the cumulative productcalculated for all previous digits in the sequence.
 3. The method ofclaim 1, wherein encoding each digit and encrypting each encoded digitare performed in response to determining the digit entered by the user;and wherein maintaining the cumulative product includes updating thecumulative product in response to encrypting each encoded digit.
 4. Themethod of claim 1, wherein encoding the digit includes calculating theencoded digit as a prime number raised to the power of the digit.
 5. Themethod of claim 1, further comprising: receiving a public key for saidencrypting using the homomorphic cryptography from an external serversystem; and verifying a signature of the public key using a certificateauthority.
 6. A method of encrypting a passcode, the method comprising:receiving an indication of a portion of the passcode; calculating, via aprocessor of a computing device, a plaintext value based at least inpart on the indication, wherein the plaintext value represents anencoded portion of the passcode; encrypting, via the processor, theplaintext value into ciphertext using a homomorphic encryption system;and updating, via the processor, a cumulative encryption string byexecuting a cumulative operation to aggregate the ciphertextcorresponding to the encoded portion into the cumulative encryptionstring computed for a previous portion of the passcode, wherein thecumulative operation is in accordance with a homomorphic property of thehomomorphic encryption system.
 7. The method of claim 6, whereinreceiving the indication includes receiving a key entry corresponding toa symbol that is part of the passcode.
 8. The method of claim 7, whereincalculating the plaintext value is based at least in part on a numericrepresentation (“d_(i)”) of the symbol.
 9. The method of claim 8,wherein the symbol is a numeric digit and the numeric representation ofthe symbol is the numeric digit.
 10. The method of claim 8, whereincalculating the plaintext value comprises: selecting, based on asequential position (“i”) of the portion corresponding to the indicationreceived, a prime number (“p₁”) from a set of prime number bases; andcalculating the selected prime number raised to the power of the numericrepresentation of the symbol.
 11. The method of claim 10, furthercomprising selecting the prime number from a set of prime bases based atleast partly on the position of the digit in the sequence of digits. 12.The method of claim 11, wherein each prime number (p) in the set ofprime bases satisfies p^(q)=1 (mod N), wherein the homomorphiccryptography is based on ElGamal asymmetric encryption and N is themodulus chosen to perform the ElGamal encryption and q is a SophieGermain prime associated with N such that N=2q +1.
 13. The method ofclaim 10, further comprising receiving at least a portion ofcryptography parameters, including the set of prime bases, for thehomomorphic cryptography from an external server system, wherein thecryptography parameters are associated with a hardware ID of the cardreader.
 14. The method of claim 10, further comprising receiving atleast a portion of cryptography parameters, including the set of primebases, for the homomorphic cryptography from the card reader.
 15. Themethod of claim 7, further comprising displaying a passcode entryinterface on a touchscreen, the passcode entry interface includesinteractive elements labeled with symbols for composing passcodes;wherein receiving the key entry includes receiving a touch event on thetouchscreen; and wherein the touch event includes a location on thepasscode entry interface where the touch event occurs.
 16. The method ofclaim 6, wherein encrypting using the homomorphic encryption systemincludes encrypting using an ElGamal encryption system or a variantthereof.
 17. The method of claim 6, further comprising transmitting amessage indicative of at least the cumulative encryption string to adestination device to verify the passcode.
 18. The method of claim 17,further comprising requesting a public key associated with a hardware IDof the destination device from an external server; and whereinencrypting the plaintext value includes encrypting the plaintext valueusing the public key.
 19. The method of claim 17, further comprisingrequesting a public key from the destination device; and whereinencrypting the plaintext value includes encrypting the plaintext valueusing the public key.
 20. The method of claim 6, wherein executing thecumulative operation includes computing a product of the ciphertext anda cumulative product of all previous ciphertexts corresponding to allpreviously encrypted portions of the passcode.
 21. The method of claim6, wherein encrypting the plaintext value includes generating a randomvariable by reading a pseudorandom stream using a non-buffering I/Ocall; and wherein encrypting the plaintext value is based at least inpart on the random variable.
 22. A method of verifying a passcode entryby a user, the method comprising: receiving ciphertext from a passcodeentry device; decrypting the ciphertext into plaintext, wherein theplaintext is indicative of a product of encoded portions of the passcodeentry, wherein each encoded portion represents a portion in the passcodeentry and a position of the portion in the passcode entry; and verifyingthe passcode entry based at least partly on the product of the encodedportions.
 23. The method of claim 22, wherein each encoded portion isindicative of a symbol that is part of the passcode entry and theposition of the symbol in the passcode entry.
 24. The method of claim22, wherein decrypting the ciphertext includes decrypting the ciphertextusing a decryption mechanism of a homomorphic cryptosystem.
 25. Themethod of claim 24, wherein decrypting the ciphertext includesdecrypting using an ElGamal encryption system or a variant thereof. 26.The method of claim 22, wherein verifying the passcode entry includes:calculating a hash string based at least partly on an authenticpasscode; and verifying the passcode entry based at least partly on thehash string and the product of the encoded portions.
 27. The method ofclaim 22, wherein verifying the passcode entry includes: retrieving anauthentic passcode; and determining a sequence of symbols representativeof the passcode entry by factoring the product of the encoded portionsusing a set of prime numbers used to encode each portion; and sendingthe sequence of symbols to be compared against the authentic passcode ina financial transaction card.
 28. An apparatus comprising: a memorydevice storing executable instructions, that, when executed by aprocessor, is operable to: receive an indication of a portion of apasscode; calculate a plaintext value based at least in part on theindication, wherein the plaintext value represents an encoded portion ofthe passcode; encrypt the plaintext value into ciphertext using ahomomorphic encryption system; and update a cumulative encryption stringby executing a cumulative operation to aggregate the ciphertextcorresponding to the encoded portion into the cumulative encryptionstring computed for a previous portion of the passcode, wherein thecumulative operation is in accordance with a homomorphic property of thehomomorphic encryption system.
 29. An apparatus comprising: an interfaceto receive a message including ciphertext representing a passcode entryof a user; a read head to access card information stored in a paymentcard; and a logic circuitry configured to: decrypt the ciphertext intoplaintext, wherein the plaintext is indicative of a product of encodedportions of the passcode entry, wherein each encoded portion representsa portion in the passcode entry and a position of the portion in thepasscode entry; and verify the passcode entry based at least partly onthe product of the encoded portions and an authentic passcode accessiblevia the read head.